<%@ include file="../layout/taglib.jsp"%>
<div class="content-allcourse" id="content-allcourse">
	<div class="wrap">

		<div class="section group">

			<c:forEach items="${courses}" var="course">
				<!-- <div class="col_1_of_4 span_1_of_4">
					<div class="homeBox">
						<div class="one_fourth">
							<div class="boxImage">
								<img src="photoCor?idCor=${course.idCourse}" alt="" />
							</div>
						</div>
						<div class="caption">${course.titleProd}</div>
						<p class="lnk">
							<a href="course?idCor=${course.idCourse}"><t:message
									code="more" /> </a>
						</p>
					</div>
				</div> -->
				<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3">
					<figure class="boxImage cell1" id="${course.idCourse}">
						<img
							src="<%=request.getContextPath()%>/photoCorfront/${course.idCourse};"
							alt="Courses image">
						<figcaption>
							<div id="image_user">
								<img alt="${course.teacher.firstName}"
									src="<%=request.getContextPath()%>/photoUser?idUser=${course.teacher.idUser}">
							</div>

							<div id="text_title">
								<p>${course.titleProd}</p>
							</div>
							<div id="text_name">
								<p>By ${course.teacher.firstName}</p>
							</div>
							<hr class="break_line">
							<div id="text_view">
								<img alt="view"
									src="<%=request.getContextPath()%>/resources/images/front/View.png">
								<c:if test="${empty course.nbview}">0</c:if>
								<c:if test="${not empty course.nbview}">${course.nbview}</c:if>

							</div>
							<c:if test="${not empty course.dateCreation}">

								<fmt:formatDate var="creation_year1"
									value="${course.dateCreation}" pattern="yyyy" />
								<div id="text_view">
									<img alt="Calendar"
										src="<%=request.getContextPath()%>/resources/images/front/Calendar.png"
										width="10px"> Created ${year-creation_year1} years ago
								</div>
							</c:if>
						</figcaption>
					</figure>
				</div>
			</c:forEach>


			<div class="clear"></div>
		</div>
	</div>
</div>